using Pkg
Pkg.add("CSV")
Resolving package versions... No Changes to `C:\Users\USER\.julia\environments\v1.9\Project.toml` No Changes to `C:\Users\USER\.julia\environments\v1.9\Manifest.toml`
using CSV
using DataFrames
csv_reader = CSV.File("C:/Users/USER/Documents/bank-full.csv")
45211-element CSV.File:
CSV.Row: (age = 58, job = String15("management"), marital = String15("married"), education = String15("tertiary"), default = String3("no"), balance = 2143, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 261, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 44, job = String15("technician"), marital = String15("single"), education = String15("secondary"), default = String3("no"), balance = 29, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 151, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 33, job = String15("entrepreneur"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 2, housing = String3("yes"), loan = String3("yes"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 76, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 47, job = String15("blue-collar"), marital = String15("married"), education = String15("unknown"), default = String3("no"), balance = 1506, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 92, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 33, job = String15("unknown"), marital = String15("single"), education = String15("unknown"), default = String3("no"), balance = 1, housing = String3("no"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 198, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 35, job = String15("management"), marital = String15("married"), education = String15("tertiary"), default = String3("no"), balance = 231, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 139, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 28, job = String15("management"), marital = String15("single"), education = String15("tertiary"), default = String3("no"), balance = 447, housing = String3("yes"), loan = String3("yes"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 217, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 42, job = String15("entrepreneur"), marital = String15("divorced"), education = String15("tertiary"), default = String3("yes"), balance = 2, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 380, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 58, job = String15("retired"), marital = String15("married"), education = String15("primary"), default = String3("no"), balance = 121, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 50, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 43, job = String15("technician"), marital = String15("single"), education = String15("secondary"), default = String3("no"), balance = 593, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 55, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 41, job = String15("admin."), marital = String15("divorced"), education = String15("secondary"), default = String3("no"), balance = 270, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 222, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 29, job = String15("admin."), marital = String15("single"), education = String15("secondary"), default = String3("no"), balance = 390, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 137, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 53, job = String15("technician"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 6, housing = String3("yes"), loan = String3("no"), contact = String15("unknown"), day = 5, month = String3("may"), duration = 517, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
⋮
CSV.Row: (age = 34, job = String15("blue-collar"), marital = String15("single"), education = String15("secondary"), default = String3("no"), balance = 1475, housing = String3("yes"), loan = String3("no"), contact = String15("cellular"), day = 16, month = String3("nov"), duration = 1166, campaign = 3, pdays = 530, previous = 12, poutcome = String7("other"), y = String3("no"))
CSV.Row: (age = 38, job = String15("technician"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 557, housing = String3("yes"), loan = String3("no"), contact = String15("cellular"), day = 16, month = String3("nov"), duration = 1556, campaign = 4, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("yes"))
CSV.Row: (age = 53, job = String15("management"), marital = String15("married"), education = String15("tertiary"), default = String3("no"), balance = 583, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 226, campaign = 1, pdays = 184, previous = 4, poutcome = String7("success"), y = String3("yes"))
CSV.Row: (age = 34, job = String15("admin."), marital = String15("single"), education = String15("secondary"), default = String3("no"), balance = 557, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 224, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("yes"))
CSV.Row: (age = 23, job = String15("student"), marital = String15("single"), education = String15("tertiary"), default = String3("no"), balance = 113, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 266, campaign = 1, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("yes"))
CSV.Row: (age = 73, job = String15("retired"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 2850, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 300, campaign = 1, pdays = 40, previous = 8, poutcome = String7("failure"), y = String3("yes"))
CSV.Row: (age = 25, job = String15("technician"), marital = String15("single"), education = String15("secondary"), default = String3("no"), balance = 505, housing = String3("no"), loan = String3("yes"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 386, campaign = 2, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("yes"))
CSV.Row: (age = 51, job = String15("technician"), marital = String15("married"), education = String15("tertiary"), default = String3("no"), balance = 825, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 977, campaign = 3, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("yes"))
CSV.Row: (age = 71, job = String15("retired"), marital = String15("divorced"), education = String15("primary"), default = String3("no"), balance = 1729, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 456, campaign = 2, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("yes"))
CSV.Row: (age = 72, job = String15("retired"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 5715, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 1127, campaign = 5, pdays = 184, previous = 3, poutcome = String7("success"), y = String3("yes"))
CSV.Row: (age = 57, job = String15("blue-collar"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 668, housing = String3("no"), loan = String3("no"), contact = String15("telephone"), day = 17, month = String3("nov"), duration = 508, campaign = 4, pdays = -1, previous = 0, poutcome = String7("unknown"), y = String3("no"))
CSV.Row: (age = 37, job = String15("entrepreneur"), marital = String15("married"), education = String15("secondary"), default = String3("no"), balance = 2971, housing = String3("no"), loan = String3("no"), contact = String15("cellular"), day = 17, month = String3("nov"), duration = 361, campaign = 2, pdays = 188, previous = 11, poutcome = String7("other"), y = String3("no"))
df = DataFrame(csv_reader)
| Row | age | job | marital | education | default | balance | housing | loan | contact | day | month | duration | campaign | pdays | previous | poutcome | y |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Int64 | String15 | String15 | String15 | String3 | Int64 | String3 | String3 | String15 | Int64 | String3 | Int64 | Int64 | Int64 | Int64 | String7 | String3 | |
| 1 | 58 | management | married | tertiary | no | 2143 | yes | no | unknown | 5 | may | 261 | 1 | -1 | 0 | unknown | no |
| 2 | 44 | technician | single | secondary | no | 29 | yes | no | unknown | 5 | may | 151 | 1 | -1 | 0 | unknown | no |
| 3 | 33 | entrepreneur | married | secondary | no | 2 | yes | yes | unknown | 5 | may | 76 | 1 | -1 | 0 | unknown | no |
| 4 | 47 | blue-collar | married | unknown | no | 1506 | yes | no | unknown | 5 | may | 92 | 1 | -1 | 0 | unknown | no |
| 5 | 33 | unknown | single | unknown | no | 1 | no | no | unknown | 5 | may | 198 | 1 | -1 | 0 | unknown | no |
| 6 | 35 | management | married | tertiary | no | 231 | yes | no | unknown | 5 | may | 139 | 1 | -1 | 0 | unknown | no |
| 7 | 28 | management | single | tertiary | no | 447 | yes | yes | unknown | 5 | may | 217 | 1 | -1 | 0 | unknown | no |
| 8 | 42 | entrepreneur | divorced | tertiary | yes | 2 | yes | no | unknown | 5 | may | 380 | 1 | -1 | 0 | unknown | no |
| 9 | 58 | retired | married | primary | no | 121 | yes | no | unknown | 5 | may | 50 | 1 | -1 | 0 | unknown | no |
| 10 | 43 | technician | single | secondary | no | 593 | yes | no | unknown | 5 | may | 55 | 1 | -1 | 0 | unknown | no |
| 11 | 41 | admin. | divorced | secondary | no | 270 | yes | no | unknown | 5 | may | 222 | 1 | -1 | 0 | unknown | no |
| 12 | 29 | admin. | single | secondary | no | 390 | yes | no | unknown | 5 | may | 137 | 1 | -1 | 0 | unknown | no |
| 13 | 53 | technician | married | secondary | no | 6 | yes | no | unknown | 5 | may | 517 | 1 | -1 | 0 | unknown | no |
| ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
| 45200 | 34 | blue-collar | single | secondary | no | 1475 | yes | no | cellular | 16 | nov | 1166 | 3 | 530 | 12 | other | no |
| 45201 | 38 | technician | married | secondary | no | 557 | yes | no | cellular | 16 | nov | 1556 | 4 | -1 | 0 | unknown | yes |
| 45202 | 53 | management | married | tertiary | no | 583 | no | no | cellular | 17 | nov | 226 | 1 | 184 | 4 | success | yes |
| 45203 | 34 | admin. | single | secondary | no | 557 | no | no | cellular | 17 | nov | 224 | 1 | -1 | 0 | unknown | yes |
| 45204 | 23 | student | single | tertiary | no | 113 | no | no | cellular | 17 | nov | 266 | 1 | -1 | 0 | unknown | yes |
| 45205 | 73 | retired | married | secondary | no | 2850 | no | no | cellular | 17 | nov | 300 | 1 | 40 | 8 | failure | yes |
| 45206 | 25 | technician | single | secondary | no | 505 | no | yes | cellular | 17 | nov | 386 | 2 | -1 | 0 | unknown | yes |
| 45207 | 51 | technician | married | tertiary | no | 825 | no | no | cellular | 17 | nov | 977 | 3 | -1 | 0 | unknown | yes |
| 45208 | 71 | retired | divorced | primary | no | 1729 | no | no | cellular | 17 | nov | 456 | 2 | -1 | 0 | unknown | yes |
| 45209 | 72 | retired | married | secondary | no | 5715 | no | no | cellular | 17 | nov | 1127 | 5 | 184 | 3 | success | yes |
| 45210 | 57 | blue-collar | married | secondary | no | 668 | no | no | telephone | 17 | nov | 508 | 4 | -1 | 0 | unknown | no |
| 45211 | 37 | entrepreneur | married | secondary | no | 2971 | no | no | cellular | 17 | nov | 361 | 2 | 188 | 11 | other | no |
describe(df)
| Row | variable | mean | min | median | max | nmissing | eltype |
|---|---|---|---|---|---|---|---|
| Symbol | Union… | Any | Union… | Any | Int64 | DataType | |
| 1 | age | 40.9362 | 18 | 39.0 | 95 | 0 | Int64 |
| 2 | job | admin. | unknown | 0 | String15 | ||
| 3 | marital | divorced | single | 0 | String15 | ||
| 4 | education | primary | unknown | 0 | String15 | ||
| 5 | default | no | yes | 0 | String3 | ||
| 6 | balance | 1362.27 | -8019 | 448.0 | 102127 | 0 | Int64 |
| 7 | housing | no | yes | 0 | String3 | ||
| 8 | loan | no | yes | 0 | String3 | ||
| 9 | contact | cellular | unknown | 0 | String15 | ||
| 10 | day | 15.8064 | 1 | 16.0 | 31 | 0 | Int64 |
| 11 | month | apr | sep | 0 | String3 | ||
| 12 | duration | 258.163 | 0 | 180.0 | 4918 | 0 | Int64 |
| 13 | campaign | 2.76384 | 1 | 2.0 | 63 | 0 | Int64 |
| 14 | pdays | 40.1978 | -1 | -1.0 | 871 | 0 | Int64 |
| 15 | previous | 0.580323 | 0 | 0.0 | 275 | 0 | Int64 |
| 16 | poutcome | failure | unknown | 0 | String7 | ||
| 17 | y | no | yes | 0 | String3 |
gdf = groupby(df, :job)
gdf_summary = combine(gdf, nrow)
| Row | job | nrow |
|---|---|---|
| String15 | Int64 | |
| 1 | management | 9458 |
| 2 | technician | 7597 |
| 3 | entrepreneur | 1487 |
| 4 | blue-collar | 9732 |
| 5 | unknown | 288 |
| 6 | retired | 2264 |
| 7 | admin. | 5171 |
| 8 | services | 4154 |
| 9 | self-employed | 1579 |
| 10 | unemployed | 1303 |
| 11 | housemaid | 1240 |
| 12 | student | 938 |
!Pkg.add("StatsPlots")
Resolving package versions... Installed Calculus ───────────────────── v0.5.1 Installed Libmount_jll ───────────────── v2.35.0+0 Installed GR_jll ─────────────────────── v0.72.10+0 Installed JpegTurbo_jll ──────────────── v3.0.1+0 Installed x265_jll ───────────────────── v3.5.0+0 Installed libfdk_aac_jll ─────────────── v2.0.2+0 Installed HypergeometricFunctions ────── v0.3.23 Installed LERC_jll ───────────────────── v3.0.0+1 Installed OffsetArrays ───────────────── v1.13.0 Installed FFTW ───────────────────────── v1.7.2 Installed StatsFuns ──────────────────── v1.3.0 Installed Opus_jll ───────────────────── v1.3.2+0 Installed Xorg_xkbcomp_jll ───────────── v1.4.6+0 Installed LoggingExtras ──────────────── v1.0.3 Installed RelocatableFolders ─────────── v1.0.1 Installed Unitful ────────────────────── v1.19.0 Installed Measures ───────────────────── v0.3.2 Installed PDMats ─────────────────────── v0.11.31 Installed ConcurrentUtilities ────────── v2.3.0 Installed Contour ────────────────────── v0.6.2 Installed StaticArrays ───────────────── v1.9.1 Installed Grisu ──────────────────────── v1.0.2 Installed Xorg_xcb_util_wm_jll ───────── v0.4.1+1 Installed NearestNeighbors ───────────── v0.4.16 Installed Formatting ─────────────────── v0.4.2 Installed Xorg_xcb_util_image_jll ────── v0.4.0+1 Installed Xorg_libpthread_stubs_jll ──── v0.1.1+0 Installed ColorSchemes ───────────────── v3.24.0 Installed RecipesPipeline ────────────── v0.6.12 Installed PlotUtils ──────────────────── v1.4.0 Installed OpenSSL ────────────────────── v1.4.1 Installed DelimitedFiles ─────────────── v1.9.1 Installed HTTP ───────────────────────── v1.10.1 Installed Xorg_libSM_jll ─────────────── v1.2.3+0 Installed Libgpg_error_jll ───────────── v1.42.0+0 Installed Cairo_jll ──────────────────── v1.16.1+1 Installed Xorg_xcb_util_jll ──────────── v0.4.0+1 Installed IntelOpenMP_jll ────────────── v2024.0.2+0 Installed Fontconfig_jll ─────────────── v2.13.93+0 Installed Xorg_libxkbfile_jll ────────── v1.1.2+0 Installed Xorg_libXinerama_jll ───────── v1.1.4+4 Installed Xorg_libXau_jll ────────────── v1.0.11+0 Installed EpollShim_jll ──────────────── v0.0.20230411+0 Installed IrrationalConstants ────────── v0.2.2 Installed FFMPEG ─────────────────────── v0.4.1 Installed Distances ──────────────────── v0.10.11 Installed GR ─────────────────────────── v0.72.10 Installed Showoff ────────────────────── v1.0.3 Installed Bzip2_jll ──────────────────── v1.0.8+0 Installed Xorg_xcb_util_keysyms_jll ──── v0.4.0+1 Installed xkbcommon_jll ──────────────── v1.4.1+1 Installed SimpleBufferStream ─────────── v1.1.0 Installed XZ_jll ─────────────────────── v5.4.5+0 Installed Pipe ───────────────────────── v1.3.0 Installed SpecialFunctions ───────────── v2.3.1 Installed Clustering ─────────────────── v0.15.6 Installed HarfBuzz_jll ───────────────── v2.8.1+1 Installed fzf_jll ────────────────────── v0.43.0+0 Installed PlotThemes ─────────────────── v3.1.0 Installed NaNMath ────────────────────── v1.0.2 Installed StaticArraysCore ───────────── v1.4.2 Installed LZO_jll ────────────────────── v2.10.1+0 Installed FriBidi_jll ────────────────── v1.0.10+0 Installed UnicodeFun ─────────────────── v0.4.1 Installed GLFW_jll ───────────────────── v3.3.9+0 Installed Rmath_jll ──────────────────── v0.4.0+0 Installed FreeType2_jll ──────────────── v2.13.1+0 Installed x264_jll ───────────────────── v2021.5.5+0 Installed Ratios ─────────────────────── v0.4.5 Installed StatsAPI ───────────────────── v1.7.0 Installed JLFzf ──────────────────────── v0.1.7 Installed Colors ─────────────────────── v0.12.10 Installed libpng_jll ─────────────────── v1.6.40+0 Installed mtdev_jll ──────────────────── v1.1.6+0 Installed Xorg_libxcb_jll ────────────── v1.15.0+0 Installed libaom_jll ─────────────────── v3.4.0+0 Installed ExceptionUnwrapping ────────── v0.1.10 Installed StatsBase ──────────────────── v0.34.2 Installed Scratch ────────────────────── v1.2.1 Installed ColorTypes ─────────────────── v0.11.4 Installed gperf_jll ──────────────────── v3.1.1+0 Installed eudev_jll ──────────────────── v3.2.9+0 Installed StatsPlots ─────────────────── v0.15.6 Installed Xorg_libXext_jll ───────────── v1.3.4+4 Installed Zstd_jll ───────────────────── v1.5.5+0 Installed Xorg_xcb_util_cursor_jll ───── v0.1.4+0 Installed TensorCore ─────────────────── v0.1.1 Installed Expat_jll ──────────────────── v2.5.0+0 Installed Plots ──────────────────────── v1.39.0 Installed Libtiff_jll ────────────────── v4.5.1+1 Installed MKL_jll ────────────────────── v2024.0.0+0 Installed Xorg_libXrender_jll ────────── v0.9.10+4 Installed ColorVectorSpace ───────────── v0.10.0 Installed AbstractFFTs ───────────────── v1.5.0 Installed Libffi_jll ─────────────────── v3.2.2+1 Installed libevdev_jll ───────────────── v1.11.0+0 Installed ChainRulesCore ─────────────── v1.19.1 Installed libinput_jll ───────────────── v1.18.0+0 Installed Ogg_jll ────────────────────── v1.3.5+1 Installed Xorg_libXi_jll ─────────────── v1.7.10+4 Installed Vulkan_Loader_jll ──────────── v1.3.243+0 Installed KernelDensity ──────────────── v0.6.8 Installed XSLT_jll ───────────────────── v1.1.34+0 Installed FFTW_jll ───────────────────── v3.3.10+0 Installed Libuuid_jll ────────────────── v2.36.0+0 Installed OpenSpecFun_jll ────────────── v0.5.5+0 Installed Xorg_libXcursor_jll ────────── v1.2.0+4 Installed MacroTools ─────────────────── v0.5.12 Installed LogExpFunctions ────────────── v0.3.26 Installed MultivariateStats ──────────── v0.10.2 Installed Wayland_protocols_jll ──────── v1.31.0+0 Installed Widgets ────────────────────── v0.6.6 Installed Xorg_xcb_util_renderutil_jll ─ v0.3.9+1 Installed Xorg_libICE_jll ────────────── v1.0.10+1 Installed Graphite2_jll ──────────────── v1.3.14+0 Installed DocStringExtensions ────────── v0.9.3 Installed Adapt ──────────────────────── v3.7.2 Installed Interpolations ─────────────── v0.14.7 Installed Pixman_jll ─────────────────── v0.42.2+0 Installed XML2_jll ───────────────────── v2.12.2+0 Installed libass_jll ─────────────────── v0.15.1+0 Installed DualNumbers ────────────────── v0.6.8 Installed Rmath ──────────────────────── v0.7.1 Installed Gettext_jll ────────────────── v0.21.0+0 Installed Wayland_jll ────────────────── v1.21.0+1 Installed Latexify ───────────────────── v0.16.1 Installed Arpack_jll ─────────────────── v3.5.1+1 Installed OpenSSL_jll ────────────────── v3.0.12+0 Installed Xorg_xkeyboard_config_jll ──── v2.39.0+0 Installed FFMPEG_jll ─────────────────── v4.4.4+1 Installed Libgcrypt_jll ──────────────── v1.8.7+0 Installed BitFlags ───────────────────── v0.1.8 Installed LLVMOpenMP_jll ─────────────── v15.0.7+0 Installed Xorg_xtrans_jll ────────────── v1.5.0+0 Installed Xorg_libXrandr_jll ─────────── v1.5.2+4 Installed FixedPointNumbers ──────────── v0.8.4 Installed LAME_jll ───────────────────── v3.100.1+0 Installed Xorg_libXfixes_jll ─────────── v5.0.3+4 Installed RecipesBase ────────────────── v1.3.4 Installed Libiconv_jll ───────────────── v1.17.0+0 Installed TableOperations ────────────── v1.2.0 Installed Qt6Base_jll ────────────────── v6.5.3+1 Installed URIs ───────────────────────── v1.5.1 Installed Glib_jll ───────────────────── v2.76.5+0 Installed libvorbis_jll ──────────────── v1.3.7+1 Installed Arpack ─────────────────────── v0.5.4 Installed Libglvnd_jll ───────────────── v1.6.0+0 Installed QuadGK ─────────────────────── v2.9.3 Installed FillArrays ─────────────────── v1.9.3 Installed AxisAlgorithms ─────────────── v1.0.1 Installed Requires ───────────────────── v1.3.0 Installed Xorg_libX11_jll ────────────── v1.8.6+0 Installed Xorg_libXdmcp_jll ──────────── v1.1.4+0 Installed Observables ────────────────── v0.5.5 Installed WoodburyMatrices ───────────── v0.5.6 Installed UnitfulLatexify ────────────── v1.6.3 Installed Unzip ──────────────────────── v0.2.0 Installed Distributions ──────────────── v0.25.107 Updating `C:\Users\USER\.julia\environments\v1.9\Project.toml` [f3b207a7] + StatsPlots v0.15.6 Updating `C:\Users\USER\.julia\environments\v1.9\Manifest.toml` [621f4979] + AbstractFFTs v1.5.0 ⌅ [79e6a3ab] + Adapt v3.7.2 [7d9fca2a] + Arpack v0.5.4 ⌃ [13072b0f] + AxisAlgorithms v1.0.1 [d1d4a3ce] + BitFlags v0.1.8 [49dc2e85] + Calculus v0.5.1 [d360d2e6] + ChainRulesCore v1.19.1 [aaaa29a8] + Clustering v0.15.6 [35d6a980] + ColorSchemes v3.24.0 [3da002f7] + ColorTypes v0.11.4 [c3611d14] + ColorVectorSpace v0.10.0 [5ae59095] + Colors v0.12.10 [f0e56b4a] + ConcurrentUtilities v2.3.0 [d38c429a] + Contour v0.6.2 [8bb1440f] + DelimitedFiles v1.9.1 [b4f34e82] + Distances v0.10.11 [31c24e10] + Distributions v0.25.107 [ffbed154] + DocStringExtensions v0.9.3 [fa6b7ba4] + DualNumbers v0.6.8 [460bff9d] + ExceptionUnwrapping v0.1.10 [c87230d0] + FFMPEG v0.4.1 [7a1cc6ca] + FFTW v1.7.2 [1a297f60] + FillArrays v1.9.3 [53c48c17] + FixedPointNumbers v0.8.4 [59287772] + Formatting v0.4.2 ⌅ [28b8d3ca] + GR v0.72.10 [42e2da0e] + Grisu v1.0.2 [cd3eb016] + HTTP v1.10.1 [34004b35] + HypergeometricFunctions v0.3.23 ⌅ [a98d9a8b] + Interpolations v0.14.7 [92d709cd] + IrrationalConstants v0.2.2 [1019f520] + JLFzf v0.1.7 [5ab0869b] + KernelDensity v0.6.8 [23fbe1c1] + Latexify v0.16.1 [2ab3a3ac] + LogExpFunctions v0.3.26 [e6f89c97] + LoggingExtras v1.0.3 [1914dd2f] + MacroTools v0.5.12 [442fdcdd] + Measures v0.3.2 [6f286f6a] + MultivariateStats v0.10.2 [77ba4419] + NaNMath v1.0.2 [b8a86587] + NearestNeighbors v0.4.16 [510215fc] + Observables v0.5.5 [6fe1bfb0] + OffsetArrays v1.13.0 [4d8831e6] + OpenSSL v1.4.1 [90014a1f] + PDMats v0.11.31 [b98c9c47] + Pipe v1.3.0 [ccf2f8ad] + PlotThemes v3.1.0 [995b91a9] + PlotUtils v1.4.0 [91a5bcdd] + Plots v1.39.0 [1fd47b50] + QuadGK v2.9.3 [c84ed2f1] + Ratios v0.4.5 [3cdcf5f2] + RecipesBase v1.3.4 [01d81517] + RecipesPipeline v0.6.12 [05181044] + RelocatableFolders v1.0.1 [ae029012] + Requires v1.3.0 [79098fc4] + Rmath v0.7.1 [6c6a2e73] + Scratch v1.2.1 [992d4aef] + Showoff v1.0.3 [777ac1f9] + SimpleBufferStream v1.1.0 [276daf66] + SpecialFunctions v2.3.1 [90137ffa] + StaticArrays v1.9.1 [1e83bf80] + StaticArraysCore v1.4.2 [82ae8749] + StatsAPI v1.7.0 [2913bbd2] + StatsBase v0.34.2 [4c63d2b9] + StatsFuns v1.3.0 [f3b207a7] + StatsPlots v0.15.6 [ab02a1b2] + TableOperations v1.2.0 [62fd8b95] + TensorCore v0.1.1 [5c2747f8] + URIs v1.5.1 [1cfade01] + UnicodeFun v0.4.1 [1986cc42] + Unitful v1.19.0 [45397f5d] + UnitfulLatexify v1.6.3 [41fe7b60] + Unzip v0.2.0 [cc8bc4a8] + Widgets v0.6.6 ⌅ [efce3f68] + WoodburyMatrices v0.5.6 ⌅ [68821587] + Arpack_jll v3.5.1+1 [6e34b625] + Bzip2_jll v1.0.8+0 [83423d85] + Cairo_jll v1.16.1+1 [2702e6a9] + EpollShim_jll v0.0.20230411+0 [2e619515] + Expat_jll v2.5.0+0 [b22a6f82] + FFMPEG_jll v4.4.4+1 [f5851436] + FFTW_jll v3.3.10+0 [a3f928ae] + Fontconfig_jll v2.13.93+0 [d7e528f0] + FreeType2_jll v2.13.1+0 [559328eb] + FriBidi_jll v1.0.10+0 [0656b61e] + GLFW_jll v3.3.9+0 ⌅ [d2c73de3] + GR_jll v0.72.10+0 [78b55507] + Gettext_jll v0.21.0+0 [7746bdde] + Glib_jll v2.76.5+0 [3b182d85] + Graphite2_jll v1.3.14+0 [2e76f6c2] + HarfBuzz_jll v2.8.1+1 [1d5cc7b8] + IntelOpenMP_jll v2024.0.2+0 [aacddb02] + JpegTurbo_jll v3.0.1+0 [c1c5ebd0] + LAME_jll v3.100.1+0 [88015f11] + LERC_jll v3.0.0+1 [1d63c593] + LLVMOpenMP_jll v15.0.7+0 [dd4b983a] + LZO_jll v2.10.1+0 ⌅ [e9f186c6] + Libffi_jll v3.2.2+1 [d4300ac3] + Libgcrypt_jll v1.8.7+0 [7e76a0d4] + Libglvnd_jll v1.6.0+0 [7add5ba3] + Libgpg_error_jll v1.42.0+0 [94ce4f54] + Libiconv_jll v1.17.0+0 [4b2f31a3] + Libmount_jll v2.35.0+0 ⌅ [89763e89] + Libtiff_jll v4.5.1+1 [38a345b3] + Libuuid_jll v2.36.0+0 [856f044c] + MKL_jll v2024.0.0+0 [e7412a2a] + Ogg_jll v1.3.5+1 [458c3c95] + OpenSSL_jll v3.0.12+0 [efe28fd5] + OpenSpecFun_jll v0.5.5+0 [91d4177d] + Opus_jll v1.3.2+0 [30392449] + Pixman_jll v0.42.2+0 [c0090381] + Qt6Base_jll v6.5.3+1 [f50d1b31] + Rmath_jll v0.4.0+0 [a44049a8] + Vulkan_Loader_jll v1.3.243+0 [a2964d1f] + Wayland_jll v1.21.0+1 [2381bf8a] + Wayland_protocols_jll v1.31.0+0 [02c8fc9c] + XML2_jll v2.12.2+0 [aed1982a] + XSLT_jll v1.1.34+0 [ffd25f8a] + XZ_jll v5.4.5+0 [f67eecfb] + Xorg_libICE_jll v1.0.10+1 [c834827a] + Xorg_libSM_jll v1.2.3+0 [4f6342f7] + Xorg_libX11_jll v1.8.6+0 [0c0b7dd1] + Xorg_libXau_jll v1.0.11+0 [935fb764] + Xorg_libXcursor_jll v1.2.0+4 [a3789734] + Xorg_libXdmcp_jll v1.1.4+0 [1082639a] + Xorg_libXext_jll v1.3.4+4 [d091e8ba] + Xorg_libXfixes_jll v5.0.3+4 [a51aa0fd] + Xorg_libXi_jll v1.7.10+4 [d1454406] + Xorg_libXinerama_jll v1.1.4+4 [ec84b674] + Xorg_libXrandr_jll v1.5.2+4 [ea2f1a96] + Xorg_libXrender_jll v0.9.10+4 [14d82f49] + Xorg_libpthread_stubs_jll v0.1.1+0 [c7cfdc94] + Xorg_libxcb_jll v1.15.0+0 [cc61e674] + Xorg_libxkbfile_jll v1.1.2+0 [e920d4aa] + Xorg_xcb_util_cursor_jll v0.1.4+0 [12413925] + Xorg_xcb_util_image_jll v0.4.0+1 [2def613f] + Xorg_xcb_util_jll v0.4.0+1 [975044d2] + Xorg_xcb_util_keysyms_jll v0.4.0+1 [0d47668e] + Xorg_xcb_util_renderutil_jll v0.3.9+1 [c22f9ab0] + Xorg_xcb_util_wm_jll v0.4.1+1 [35661453] + Xorg_xkbcomp_jll v1.4.6+0 [33bec58e] + Xorg_xkeyboard_config_jll v2.39.0+0 [c5fb5394] + Xorg_xtrans_jll v1.5.0+0 [3161d3a3] + Zstd_jll v1.5.5+0 [35ca27e7] + eudev_jll v3.2.9+0 [214eeab7] + fzf_jll v0.43.0+0 [1a1c6b14] + gperf_jll v3.1.1+0 [a4ae2306] + libaom_jll v3.4.0+0 [0ac62f75] + libass_jll v0.15.1+0 [2db6ffa8] + libevdev_jll v1.11.0+0 [f638f0a6] + libfdk_aac_jll v2.0.2+0 [36db933b] + libinput_jll v1.18.0+0 [b53b4c65] + libpng_jll v1.6.40+0 [f27f6e37] + libvorbis_jll v1.3.7+1 [009596ad] + mtdev_jll v1.1.6+0 [1270edf5] + x264_jll v2021.5.5+0 [dfaa095f] + x265_jll v3.5.0+0 [d8fb68d0] + xkbcommon_jll v1.4.1+1 [8ba89e20] + Distributed [4af54fe1] + LazyArtifacts [1a1011a3] + SharedArrays [4607b0f0] + SuiteSparse [05823500] + OpenLibm_jll v0.8.1+0 [efcefdf7] + PCRE2_jll v10.42.0+0 Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m` Precompiling project... ✓ TensorCore ✓ AbstractFFTs ✓ Calculus ✓ StatsAPI ✓ Contour ✓ ConcurrentUtilities ✓ Pipe ✓ OffsetArrays ✓ Xorg_libICE_jll ✓ FillArrays ✓ WoodburyMatrices ✓ Measures ✓ Observables ✓ Grisu ✓ Requires ✓ Unzip ✓ DocStringExtensions ✓ URIs ✓ MacroTools ✓ IrrationalConstants ✓ SimpleBufferStream ✓ ExceptionUnwrapping ✓ Formatting ✓ NaNMath ✓ DelimitedFiles ✓ ChainRulesCore ✓ BitFlags ✓ UnicodeFun ✓ Scratch ✓ LoggingExtras ✓ StaticArraysCore ✓ PDMats ✓ RecipesBase ✓ OpenSSL_jll ✓ FixedPointNumbers ✓ Graphite2_jll ✓ Libmount_jll ✓ EpollShim_jll ✓ LLVMOpenMP_jll ✓ Bzip2_jll ✓ Rmath_jll ✓ Xorg_libXau_jll ✓ libpng_jll ✓ libfdk_aac_jll ✓ IntelOpenMP_jll ✓ LAME_jll ✓ LERC_jll ✓ fzf_jll ✓ JpegTurbo_jll ✓ XZ_jll ✓ Ogg_jll ✓ mtdev_jll ✓ gperf_jll ✓ Xorg_libXdmcp_jll ✓ x265_jll ✓ x264_jll ✓ libaom_jll ✓ Zstd_jll ✓ Arpack_jll ✓ Expat_jll ✓ LZO_jll ✓ Opus_jll ✓ Xorg_xtrans_jll ✓ libevdev_jll ✓ Libiconv_jll ✓ Libffi_jll ✓ Libgpg_error_jll ✓ Wayland_protocols_jll ✓ FFTW_jll ✓ OpenSpecFun_jll ✓ Xorg_libpthread_stubs_jll ✓ FriBidi_jll ✓ Libuuid_jll ✓ TableOperations ✓ QuadGK ✓ Distances ✓ AbstractFFTs → AbstractFFTsTestExt ✓ Xorg_libSM_jll ✓ FillArrays → FillArraysStatisticsExt ✓ FillArrays → FillArraysSparseArraysExt ✓ AxisAlgorithms ✓ Showoff ✓ Ratios ✓ Adapt ✓ LogExpFunctions ✓ ChainRulesCore → ChainRulesCoreSparseArraysExt ✓ AbstractFFTs → AbstractFFTsChainRulesCoreExt ✓ RelocatableFolders ✓ Latexify ✓ FillArrays → FillArraysPDMatsExt ✓ OpenSSL ✓ ColorTypes ✓ Pixman_jll ✓ FreeType2_jll ✓ Rmath ✓ StaticArrays ✓ JLFzf ✓ libvorbis_jll ✓ Unitful ✓ eudev_jll ✓ Libtiff_jll ✓ Arpack ✓ XML2_jll ✓ Distances → DistancesSparseArraysExt ✓ Libgcrypt_jll ✓ Distances → DistancesChainRulesCoreExt ✓ Ratios → RatiosFixedPointNumbersExt ✓ OffsetArrays → OffsetArraysAdaptExt ✓ LogExpFunctions → LogExpFunctionsChainRulesCoreExt ✓ Latexify → DataFramesExt ✓ HTTP ✓ ColorVectorSpace ✓ Colors ✓ Fontconfig_jll ✓ StaticArrays → StaticArraysChainRulesCoreExt ✓ MKL_jll ✓ StaticArrays → StaticArraysStatisticsExt ✓ libinput_jll ✓ Adapt → AdaptStaticArraysExt ✓ Wayland_jll ✓ Gettext_jll ✓ UnitfulLatexify ✓ XSLT_jll ✓ StatsBase ✓ NearestNeighbors ✓ Widgets ✓ SpecialFunctions ✓ Glib_jll ✓ Xorg_libxcb_jll ✓ Interpolations ✓ MultivariateStats ✓ Clustering ✓ SpecialFunctions → SpecialFunctionsChainRulesCoreExt ✓ DualNumbers ✓ ColorVectorSpace → SpecialFunctionsExt ✓ Xorg_xcb_util_jll ✓ Xorg_libX11_jll ✓ HypergeometricFunctions ✓ Xorg_xcb_util_image_jll ✓ Xorg_xcb_util_keysyms_jll ✓ Xorg_xcb_util_renderutil_jll ✓ Xorg_xcb_util_wm_jll ✓ Xorg_libXrender_jll ✓ Xorg_libXext_jll ✓ ColorSchemes ✓ Xorg_libXfixes_jll ✓ FFTW ✓ Xorg_libxkbfile_jll ✓ Xorg_xcb_util_cursor_jll ✓ Libglvnd_jll ✓ Xorg_libXinerama_jll ✓ Xorg_libXrandr_jll ✓ StatsFuns ✓ Xorg_libXcursor_jll ✓ Cairo_jll ✓ Xorg_libXi_jll ✓ Xorg_xkbcomp_jll ✓ StatsFuns → StatsFunsChainRulesCoreExt ✓ HarfBuzz_jll ✓ GLFW_jll ✓ Xorg_xkeyboard_config_jll ✓ libass_jll ✓ xkbcommon_jll ✓ Distributions ✓ Vulkan_Loader_jll ✓ FFMPEG_jll ✓ Distributions → DistributionsTestExt ✓ Qt6Base_jll ✓ PlotUtils ✓ FFMPEG ✓ Distributions → DistributionsChainRulesCoreExt ✓ GR_jll ✓ KernelDensity ✓ PlotThemes ✓ RecipesPipeline ✓ GR ✓ Plots ✓ Plots → IJuliaExt ✓ Plots → UnitfulExt ✓ StatsPlots 180 dependencies successfully precompiled in 744 seconds. 50 already precompiled. 1 dependency had warnings during precompilation: ┌ MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7] │ Downloading artifact: MKL └
MethodError: no method matching !(::Nothing) Closest candidates are: !(::ComposedFunction{typeof(!)}) @ Base operators.jl:1089 !(::Function) @ Base operators.jl:1088 !(::Bool) @ Base bool.jl:35 ... Stacktrace: [1] top-level scope @ In[9]:1
Pkg.add("StatsPlots")
Resolving package versions... No Changes to `C:\Users\USER\.julia\environments\v1.9\Project.toml` No Changes to `C:\Users\USER\.julia\environments\v1.9\Manifest.toml`
using StatsPlots
bar(gdf_summary[!, :nrow], xticks=(1:12, gdf_summary[!, :job]),labels="freq")
result = bar(gdf_summary[!, :nrow], xticks=(1:12, gdf_summary[!,:job]),labels="freq")
savefig(result, "C:\\Users\\USER\\Documents\\bank.png")
"C:\\Users\\USER\\Documents\\bank.png"
!Pkg.add("CategoricalArrays")
Resolving package versions... Installed CategoricalArrays ─ v0.10.8 Updating `C:\Users\USER\.julia\environments\v1.9\Project.toml` [324d7699] + CategoricalArrays v0.10.8 Updating `C:\Users\USER\.julia\environments\v1.9\Manifest.toml` [324d7699] + CategoricalArrays v0.10.8 Precompiling project... ✓ CategoricalArrays ✓ CategoricalArrays → CategoricalArraysSentinelArraysExt ✓ CategoricalArrays → CategoricalArraysRecipesBaseExt ✓ CategoricalArrays → CategoricalArraysJSONExt 4 dependencies successfully precompiled in 15 seconds. 230 already precompiled.
MethodError: no method matching !(::Nothing) Closest candidates are: !(::ComposedFunction{typeof(!)}) @ Base operators.jl:1089 !(::Function) @ Base operators.jl:1088 !(::Bool) @ Base bool.jl:35 ... Stacktrace: [1] top-level scope @ In[15]:1
using CategoricalArrays
using Statistics
balance_edge = -10000:500:1000000
df.balance_bin = cut(df[!,:balance], balance_edge)
combine(groupby(df, :balance_bin), nrow)
| Row | balance_bin | nrow |
|---|---|---|
| Cat… | Int64 | |
| 1 | [-8500, -8000) | 1 |
| 2 | [-7000, -6500) | 1 |
| 3 | [-4500, -4000) | 1 |
| 4 | [-3500, -3000) | 3 |
| 5 | [-3000, -2500) | 3 |
| 6 | [-2500, -2000) | 5 |
| 7 | [-2000, -1500) | 33 |
| 8 | [-1500, -1000) | 97 |
| 9 | [-1000, -500) | 549 |
| 10 | [-500, 0) | 3073 |
| 11 | [0, 500) | 19871 |
| 12 | [500, 1000) | 6932 |
| 13 | [1000, 1500) | 3741 |
| ⋮ | ⋮ | ⋮ |
| 91 | [52000, 52500) | 1 |
| 92 | [52500, 53000) | 3 |
| 93 | [56500, 57000) | 1 |
| 94 | [57000, 57500) | 1 |
| 95 | [58500, 59000) | 2 |
| 96 | [59500, 60000) | 1 |
| 97 | [64000, 64500) | 1 |
| 98 | [66500, 67000) | 2 |
| 99 | [71000, 71500) | 1 |
| 100 | [81000, 81500) | 2 |
| 101 | [98000, 98500) | 1 |
| 102 | [102000, 102500) | 1 |
!Pkg.add("Plots")
Resolving package versions... Updating `C:\Users\USER\.julia\environments\v1.9\Project.toml` [91a5bcdd] + Plots v1.39.0 No Changes to `C:\Users\USER\.julia\environments\v1.9\Manifest.toml`
MethodError: no method matching !(::Nothing) Closest candidates are: !(::ComposedFunction{typeof(!)}) @ Base operators.jl:1089 !(::Function) @ Base operators.jl:1088 !(::Bool) @ Base bool.jl:35 ... Stacktrace: [1] top-level scope @ In[23]:1
using Plots
b_range = range(-1000, 1000, length=20)
histogram(df[!,:balance],bins=b_range)
histogram(df[!,:balance],bins=b_range, normalize=:pdf,labels="probability")
xlims!(-1000, 1000)
!Pkg.add("StatsPlots")
Resolving package versions... No Changes to `C:\Users\USER\.julia\environments\v1.9\Project.toml` No Changes to `C:\Users\USER\.julia\environments\v1.9\Manifest.toml`
MethodError: no method matching !(::Nothing) Closest candidates are: !(::ComposedFunction{typeof(!)}) @ Base operators.jl:1089 !(::Function) @ Base operators.jl:1088 !(::Bool) @ Base bool.jl:35 ... Stacktrace: [1] top-level scope @ In[30]:1
using StatsPlots
scatter(df[!,:balance], df[!,:duration])